{
 "cells": [
  {
   "metadata": {},
   "cell_type": "markdown",
   "source": "# 演示numpy的常用属性",
   "id": "2eb2cf39d7f572d8"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "import numpy as np\n",
    "\n",
    "arr=np.arange(15).reshape(3,5)\n",
    "print(arr)"
   ],
   "id": "fcb246b822767a11",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "print(f'数组的维度：{arr.ndim}')\n",
    "print(f'数组的形状:{arr.shape}')\n",
    "print(f'数组的元素类型:{arr.dtype}')\n",
    "print(f'数组每个元素占据的字节数:{arr.itemsize}')\n",
    "print(f'数组元素个数:{arr.size}')\n",
    "print(f'数组的类型:{type(arr)}')"
   ],
   "id": "b5d4780b984cee28",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": "",
   "id": "ac285ce0ff7ae3ee",
   "outputs": [],
   "execution_count": null
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
